home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / il / ilWatchedObject.z / ilWatchedObject
Encoding:
Text File  |  2002-10-03  |  5.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4. iiiillllWWWWaaaattttcccchhhheeeeddddOOOObbbbjjjjeeeecccctttt((((3333))))                    IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      iiiillllWWWWaaaattttcccchhhheeeeddddOOOObbbbjjjjeeeecccctttt - lightweight alteration notifier
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      This is a base class
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <il/ilWatchedObject.h>
  16.  
  17. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      This class abstracts the general concept of watching for alterations on
  19.      slave objects.  Classes that wish to allow other objects to be notified
  20.      of changes to instances of itself can be derived from ilWatchedObject.
  21.      Other classes can then use the aaaaddddddddWWWWaaaattttcccchhhhCCCCaaaallllllllbbbbaaaacccckkkk() method with a callback
  22.      derived from either ilWatchMethodCB or ilWatchFunctionCB to monitor a
  23.      class derived from ilWatchedObject.  The callback method or function will
  24.      have the prototype:
  25.  
  26.           func(UserArgType userArg, ilWatchArg* watchArg)
  27.  
  28.  
  29.      To define and use a completion callback to a member function,
  30.      wwwwaaaattttcccchhhhNNNNoooottttiiiiffffyyyy(), of  class Bar you might do  something like:
  31.  
  32.            ...
  33.            ilStatus Bar::watchNotify(Foo*, ilWatchArg*) { ... }
  34.            ...
  35.            typedef ilWatchMethodCB<Bar,Foo*> UserWatchCallback;
  36.  
  37.            Bar bar;
  38.            Foo foo;
  39.            UserWatchCallback watchCb(&bar, Bar::watchNotify, &foo);
  40.  
  41.            watchedObject->addWatchCallback(&watchCb);
  42.  
  43.  
  44.      Each time the watched object is altered it should call ddddooooWWWWaaaattttcccchhhhCCCCaaaallllllllbbbbaaaacccckkkkssss()
  45.      to notify any listening objects.
  46.  
  47. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
  48.      CCCCaaaallllllllbbbbaaaacccckkkk mmmmaaaannnnaaaaggggeeeemmmmeeeennnntttt
  49.  
  50.           void addWatchCallback(ilCallback* cb, int autoDelete=FALSE)
  51.           ilStatus removeWatchCallback(ilCallback* cb)
  52.           ilStatus doWatchCallbacks(ilWatchReason reason=ilWatchChanged)   _p_r_o_t_e_c_t_e_d
  53.  
  54.  
  55. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  56.      aaaaddddddddWWWWaaaattttcccchhhhCCCCaaaallllllllbbbbaaaacccckkkk(((())))
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiillllWWWWaaaattttcccchhhheeeeddddOOOObbbbjjjjeeeecccctttt((((3333))))                    IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll
  71.  
  72.  
  73.  
  74.           void addWatchCallback(ilCallback* cb, int autoDelete=FALSE)
  75.  
  76.  
  77.           This method adds the callback, _c_b, to the list of objects to be
  78.           notifed when this object is changed.  If _a_u_t_o_D_e_l_e_t_e is TRUE, then
  79.           the callback will be deleted when this object is destroyed.
  80.  
  81.      ddddooooWWWWaaaattttcccchhhhCCCCaaaallllllllbbbbaaaacccckkkkssss(((())))
  82.  
  83.           ilStatus doWatchCallbacks(ilWatchReason reason=ilWatchChanged)   _p_r_o_t_e_c_t_e_d
  84.  
  85.  
  86.           This method should be called by a derived class each time this
  87.           object is altered to notify any listening objects.  Possible values
  88.           of _r_e_a_s_o_n are:
  89.  
  90.           _i_l_W_a_t_c_h_C_h_a_n_g_e_d  indicates that this object has been altered in some
  91.                           way.
  92.  
  93.           _i_l_W_a_t_c_h_D_e_l_e_t_e_d  indicates that this object has been deleted.
  94.  
  95.      rrrreeeemmmmoooovvvveeeeWWWWaaaattttcccchhhhCCCCaaaallllllllbbbbaaaacccckkkk(((())))
  96.  
  97.           ilStatus removeWatchCallback(ilCallback* cb)
  98.  
  99.  
  100.           The method remvoed a callback, _c_b, that was previously added with
  101.           aaaaddddddddWWWWaaaattttcccchhhhCCCCaaaallllllllbbbbaaaacccckkkk()
  102.  
  103. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  104.      ilTiePointList, ilKernel
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.